<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>设备信息</title>
<jsp:include page="/common/header-common.jsp"></jsp:include>
<script type="text/javascript">
	function confirmSubmit(){
		var devicenum = document.all("device.devicenum").value;
		var simnum = document.all("device.simnum").value;
		var carnum = document.all("device.carnum").value;
		var startTime = document.all("device.startTime").value;
		var endTime = document.all("device.endTime").value;
		if(devicenum == "" || simnum == "" || carnum == "" || startTime == "" || endTime == "") {
			alert("设备编号、sim号、车牌号、启用时间、停用时间不能为空");
			return false;
		}
		document.forms[0].submit();
	}
</script>
</head>
<body>
<jsp:include page="header.jsp" />
<jsp:include page="menu.html" />
<s:form action="/admin/deviceadd.action" theme="simple">
<div class="content">
	<div class="pagetitle">>>设备信息</div>
	<div id="btn_left">
	<ul>
		<li><a href="#" onclick="javascript:confirmSubmit();"><span><img src="../images/bt_submit.gif"  align='absmiddle'/></span></a></li>
	</ul>
	</div>
	<s:if test="message != null">
		<div class="return_tip">
			<s:property value="message" />
		</div>
	</s:if>
	<table class="tablecolor2" width="100%" align="center">
		<s:hidden name="device.id"></s:hidden>
		<tr align="left">
			<td align="right" width="15%">设备编号:</td>
			<td align="left"><s:textfield name="device.devicenum" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">设备密码:</td>
			<td align="left"><s:textfield name="device.devicePwd" readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">sim号:</td>
			<td align="left"><s:textfield name="device.simnum" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">车牌号:</td>
			<td align="left"><s:textfield name="device.carnum" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">用户ID:</td>
			<td align="left"><s:textfield name="device.userid"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">业主姓名:</td>
			<td align="left"><s:textfield name="device.ownername"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">业主手机:</td>
			<td align="left"><s:textfield name="device.ownerphone"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">司机姓名:</td>
			<td align="left"><s:textfield name="device.drivername"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">司机手机:</td>
			<td align="left"><s:textfield name="device.driverphone"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">司机2姓名:</td>
			<td align="left"><s:textfield name="device.driverbakname"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">司机2手机:</td>
			<td align="left"><s:textfield name="device.driverbakphone"  readonly="true" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">自检时间:</td>
			<td align="left">
				<select name="device.checkTime" >
					<option value="0"  <s:if test="device.checkTime==0">selected="selected"</s:if>>5分钟</option>
					<option value="1" <s:if test="device.checkTime==1">selected="selected"</s:if>>10分钟</option>
					<option value="2" <s:if test="device.checkTime==2">selected="selected"</s:if>>15分钟</option>
					<option value="3" <s:if test="device.checkTime==3">selected="selected"</s:if>>20分钟</option>
				</select>
			</td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">启用时间:</td>
			<td align="left"><s:textfield name="device.startTime" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">停用时间:</td>
			<td align="left"><s:textfield name="device.endTime" /></td>
		</tr>
		<tr align="left">
			<td align="right" width="15%">创建时间:</td>
			<td align="left"><s:textfield name="device.createTime"  readonly="true" /></td>
		</tr>
	</table>
</div>
</s:form>
<jsp:include page="../common/footer.jsp" />
</body>
</html>